/* packet_info.h
 * Definitions for packet info structures and routines
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef __PACKET_INFO_H__
#define __PACKET_INFO_H__

#include <stdbool.h>
#include <stdint.h>

//struct conversation_element;

/** @file
 * Dissected packet data and metadata.
 */

/** @defgroup packetinfo Packet Data and Metadata
 *
 * @{
 */

/*
 * Presence flags.
 */
#define PINFO_HAS_TS            0x00000001  /**< time stamp */

typedef struct _packet_info {
    const char *proto_name;        /**< name of protocol currently being dissected */
    uint32_t presence_flags;           /**< Presence flags for some items */
    uint32_t num;                      /**< Frame number */
    GSList *data_src;                 /**< Frame data sources */

    uint32_t match_uint;               /**< matched uint for calling subdissector from table */
    const char *match_string;         /**< matched string for calling subdissector from table */


    GHashTable *private_table;    /**< a hash table passed from one dissector to another */

//  wmem_list_t *layers;          /**< layers of each protocol */
//  wmem_map_t *proto_layers;     /** map of proto_id to curr_proto_layer_num. */
    uint8_t curr_layer_num;        /**< The current "depth" or layer number in the current frame */
    uint8_t curr_proto_layer_num;  /**< The current "depth" or layer number for this dissector in the current frame */

    int dissection_depth;         /**< The current "depth" or layer number in the current frame */

    uint32_t stream_id;            /**< Conversation Stream ID of the highest protocol */
} packet_info;

/** @} */

#endif /* __PACKET_INFO_H__ */

/*
 * Editor modelines
 *
 * Local Variables:
 * c-basic-offset: 2
 * tab-width: 8
 * indent-tabs-mode: nil
 * End:
 *
 * ex: set shiftwidth=2 tabstop=8 expandtab:
 * :indentSize=2:tabSize=8:noTabs=true:
 */
